Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lowercase the doctype #111

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

fulldecent
Copy link

Replace every DOCTYPE to doctype.

Best practice identified at https://stackoverflow.com/questions/7020961/uppercase-or-lowercase-doctype#comment71796606_7020961


The achieves not only being the same size as the existing file in the repository, but, because of GZIP compression, this is likely to be smaller when sent across the network wire, up to possibly a FULL BYTE!

@dscorbett
Copy link
Contributor

This change adds an unnecessary newline.

@fulldecent
Copy link
Author

Fixed, thank you

@dscorbett
Copy link
Contributor

It is still there.

@fulldecent
Copy link
Author

Sorry, fixed again using file upload

@fulldecent
Copy link
Author

Requesting review again, please

<!doctype html>
Copy link
Contributor

@alrra alrra Mar 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can even remove the space.

Suggested change
<!doctype html>
<!doctypehtml>

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whitespace is required

Source:

https://html.spec.whatwg.org/multipage/syntax.html#the-doctype

A DOCTYPE must consist of the following components, in this order:

  1. A string that is an ASCII case-insensitive match for the string "<!DOCTYPE".
  2. One or more ASCII whitespace.
  3. A string that is an ASCII case-insensitive match for the string "html".
  4. Optionally, a DOCTYPE legacy string.
  5. Zero or more ASCII whitespace.
  6. A U+003E GREATER-THAN SIGN character (>).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants